<style lang="scss" scoped>
.row-count{text-align: center;padding: 10px;flex-direction: column;justify-content: space-between;height: 100%;
  .value{font-weight: bold;font-size: 1.2em;}
}
</style>
<template>
  <div class="row-count flex" @click="href&&href_handle(href)">
    <div class="value max">
      <money v-if="is_money" :value="value"></money>
      <template v-else>{{ value }}</template>
    </div>
    <div class="title">{{ title }}</div>
  </div>
</template>

<script>

import {to_string} from "@/js/s94_tool.js";
import Money from "@/components/widget/Money.vue";
import {href_handle} from "@/vue_plugin/router_auto.js";

/**
 * @prop {*}
 */
export default {
  components: {Money},
  _title_: '统计单元',
  _tip_: '用于显示统计数值显示的单元',
  _head_img_: '',
  _group_: '单元组件',
  props:{
    value: {
      type: [String,Number],
      _label_: '值',
      _tip_: '在上排加粗显示的数据',
      _required_: true,
      _default_: "get($info,'value')",
    },
    title: {
      type: [String,Number],
      _label_: '标题',
      _tip_: '左侧深色字体显示的标题',
      _required_: true,
      _default_: "get($info,'title')",
    },
    is_money: {
      type: Boolean,
      _label_: '金额值',
      _tip_: '值是否以金额组件渲染',
    },
    href: {
      type: String,
      _label_: '链接地址',
      _tip_: '点击后跳转的链接地址，如果为空，点击后不跳转',
    },
  },
  data(){
    return {}
  },
  methods:{
    href_handle
  },
  computed:{
    thisData(){
      return{
        title: to_string(this.title),
      }
    }
  },
  mounted(){
  }
}
</script>